package com.ruoyi.ams.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.ruoyi.common.core.annotation.Excel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.math.BigDecimal;
import java.util.List;

/**
 * 维修信息登记对象 ams_asset_repair_record
 * 
 * @author yfkj
 * @date 2022-05-16
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class AmsAssetRepairRecord
{
    private static final long serialVersionUID = 1L;
    /** 维修信息登记表主键 */
    @TableField(exist = true)
    @TableId(type= IdType.AUTO)
    @ApiModelProperty(value =  "${comment}")
    private Long repairRecordId;
    /** 编号 */
    @Excel(name = "编号")
    @TableField(exist = true)
    @ApiModelProperty(value =  "编号")
    private String sn;
    /** 状态 */
    @Excel(name = "状态")
    @TableField(exist = true)
    @ApiModelProperty(value =  "状态")
    private String status;
    /** 流程表主键 */
    @Excel(name = "流程表主键")
    @TableField(exist = true)
    @ApiModelProperty(value =  "流程表主键")
    private Long processId;
    /** 业务时间 */
    @Excel(name = "业务时间")
    @TableField(exist = true)
    @ApiModelProperty(value =  "业务时间")
    private Long businessTime;
    @TableField(exist = false)
    @ApiModelProperty(value =  "业务时间字符串")
    private String businessTimeStr;

    /** 负责人主键 */
    @Excel(name = "负责人主键")
    @TableField(exist = true)
    @ApiModelProperty(value =  "负责人主键")
    private Long chargerId;
    @TableField(exist = false)
    @ApiModelProperty(value =  "负责人姓名")
    private String chargerName;

    /** 处理人 */
    @Excel(name = "处理人")
    @TableField(exist = true)
    @ApiModelProperty(value =  "处理人")
    private String resovleUser;
    /** 处理人联系方式 */
    @Excel(name = "处理人联系方式")
    @TableField(exist = true)
    @ApiModelProperty(value =  "处理人联系方式")
    private String contactMethod;
    /** 维修时间 */
    @Excel(name = "维修时间")
    @TableField(exist = true)
    @ApiModelProperty(value =  "维修时间")
    private Long repairTime;
    @TableField(exist = false)
    @ApiModelProperty(value =  "维修时间字符串")
    private String repairTimeStr;

    /** 报修人主键 */
    @Excel(name = "报修人主键")
    @TableField(exist = true)
    @ApiModelProperty(value =  "报修人主键")
    private Long faultReportId;
    @TableField(exist = false)
    @ApiModelProperty(value =  "报修人姓名")
    private String faultReportName;

    /** 维修内容 */
    @Excel(name = "维修内容")
    @TableField(exist = true)
    @ApiModelProperty(value =  "维修内容")
    private String repairContent;
    /** 花费 */
    @Excel(name = "花费")
    @TableField(exist = true)
    @ApiModelProperty(value =  "花费")
    private BigDecimal cost;
    /** 照片 */
    @Excel(name = "照片")
    @TableField(exist = true)
    @ApiModelProperty(value =  "照片")
    private String imageUrl;
    /** 备注 */
    @Excel(name = "备注")
    @TableField(exist = true)
    @ApiModelProperty(value =  "备注")
    private String remark;

    @TableField(exist = false)
    private List<AmsAssetRepairRecordDetail> repairRecords;

    @TableField(exist = false)
    private List<String> assetNames;

    public static final String REPAIR_RECORD_ID="repair_record_id";
    public static final String SN="sn";
    public static final String STATUS="status";
    public static final String PROCESS_ID="process_id";
    public static final String BUSINESS_TIME="business_time";
    public static final String CHARGER_ID="charger_id";
    public static final String RESOVLE_USER="resovle_user";
    public static final String CONTACT_METHOD="contact_method";
    public static final String REPAIR_TIME="repair_time";
    public static final String FAULT_REPORT_ID="fault_report_id";
    public static final String REPAIR_CONTENT="repair_content";
    public static final String COST="cost";
    public static final String REMARK="remark";
    public static final String IMAGE_URL="image_url";
    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("repairRecordId", getRepairRecordId())
            .append("sn", getSn())
            .append("status", getStatus())
            .append("processId", getProcessId())
            .append("businessTime", getBusinessTime())
            .append("chargerId", getChargerId())
            .append("resovleUser", getResovleUser())
            .append("contactMethod", getContactMethod())
            .append("repairTime", getRepairTime())
            .append("faultReportId", getFaultReportId())
            .append("repairContent", getRepairContent())
            .append("cost", getCost())
            .append("remark", getRemark())
            .append("imageUrl", getImageUrl())
            .toString();
    }
}
